﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MultipleDB.Entitys.DTO
{
    /// <summary>
    /// 模型特性验证 实体
    /// </summary>
    public class ChkModels
    {
        [Display(Name = "年龄")]
        [Required(ErrorMessage = "请输入{0}")]
        public long Id { get; set; }

        [Display(Name = "名称")]
        [Required(ErrorMessage = "请输入{0}")]
        [StringLength(32, ErrorMessage = "{0} 长度6-32位!", MinimumLength = 6)]
        public string Name { get; set; }
        [Display(Name = "备用名称")]
        [Required(ErrorMessage = "请输入{0}")]
        [StringLength(32, ErrorMessage = "{0} 长度6-32位!", MinimumLength = 6)]
        public string LastName { get; set; }

        [Display(Name = "年龄")]
        [Required(ErrorMessage = "请输入{0}")]
        public int Age { get; set; }

        [Display(Name = "Email")]
        [Required(ErrorMessage = "请输入{0}")]
        public string Email { get; set; }

        [Display(Name = "手机号码")]
        [Required(ErrorMessage = "请输入{0}")]
        [StringLength(16, ErrorMessage = "{0} 长度6-16位!", MinimumLength = 6)]
        public string Phone { get; set; }

        [Display(Name = "电话号码")]
        [Required(ErrorMessage = "请输入{0}")]
        [StringLength(16, ErrorMessage = "{0} 长度6-16位!", MinimumLength = 6)]
        public string PhoneNumber { get; set; }

        [Display(Name = "日期")]
        [Required(ErrorMessage = "请输入{0}")]
        public DateTime CreatedTime { get; set; }

    }
}
